/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package projetbi_objets;

import java.util.Objects;

/**
 * Projet BI - M2 FIC 2012-2013
 *
 * @author Jef, Tuan-Long, William, Mohamed
 */
public class ODiplome {
    private int idDiplome;
    private int idCollaborateur;
    private String libelleDiplome;
    private String nomEcole;
    private int anneeObtention;

    public ODiplome() {
    }

    public ODiplome(int idDiplome, int idCollaborateur, String libelleDiplome, String nomEcole, int anneeObtention) {
        this.idDiplome = idDiplome;
        this.idCollaborateur = idCollaborateur;
        this.libelleDiplome = libelleDiplome;
        this.nomEcole = nomEcole;
        this.anneeObtention = anneeObtention;
    }

    public int getIdDiplome() {
        return idDiplome;
    }

    public void setIdDiplome(int idDiplome) {
        this.idDiplome = idDiplome;
    }

    public int getIdCollaborateur() {
        return idCollaborateur;
    }

    public void setIdCollaborateur(int idCollaborateur) {
        this.idCollaborateur = idCollaborateur;
    }

    public String getLibelleDiplome() {
        return libelleDiplome;
    }

    public void setLibelleDiplome(String libelleDiplome) {
        this.libelleDiplome = libelleDiplome;
    }

    public String getNomEcole() {
        return nomEcole;
    }

    public void setNomEcole(String nomEcole) {
        this.nomEcole = nomEcole;
    }

    public int getAnneeObtention() {
        return anneeObtention;
    }

    public void setAnneeObtention(int anneeObtention) {
        this.anneeObtention = anneeObtention;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 23 * hash + this.idDiplome;
        hash = 23 * hash + this.idCollaborateur;
        hash = 23 * hash + Objects.hashCode(this.libelleDiplome);
        hash = 23 * hash + Objects.hashCode(this.nomEcole);
        hash = 23 * hash + this.anneeObtention;
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ODiplome other = (ODiplome) obj;
        if (this.idDiplome != other.idDiplome) {
            return false;
        }
        if (this.idCollaborateur != other.idCollaborateur) {
            return false;
        }
        if (!Objects.equals(this.libelleDiplome, other.libelleDiplome)) {
            return false;
        }
        if (!Objects.equals(this.nomEcole, other.nomEcole)) {
            return false;
        }
        if (this.anneeObtention != other.anneeObtention) {
            return false;
        }
        return true;
    }
    
    
}
